<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>RESTdoc登录</title>
    <link rel="stylesheet" type="text/css" th:href="@{/admin/css/login.css}">
    <link rel="stylesheet" th:href="@{/admin/css/main.css}" media="all">
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"/>
</head>
<body class="layui-layout-login">
<div class="login-bg">
    <div class="cover"></div>
</div>
<div class="login-content">
    <h1 class="login-box-title"><i class="fa fa-fw fa-user"></i>RESTdoc控制台登录</h1>
    <form class="layui-form" th:action="@{/auth}" method="post">
        <div class="layui-form-item">
            <label class="layui-icon layui-icon-username" for="account"></label>
            <input class="layui-input" type="text" name="account" id="account" placeholder="用户名" th:value="${account}">
        </div>
        <div class="layui-form-item">
            <label class="layui-icon layui-icon-password" for="password"></label>
            <input class="layui-input" type="password" name="password" id="password" placeholder="密码"
                   th:value="${password}">
        </div>
        <button type="submit" class="layui-btn layui-btn-fluid ajax-login"><i class="fa fa-sign-in fa-lg fa-fw"></i> 登录
        </button>
    </form>
</div>
<script th:src="@{/layui/layui.js}"></script>
<script th:src="@{/admin/js/main.js}"></script>

<script type="text/javascript" th:inline="javascript">
    var errorMessage = [[${errorMessage}]];


    layui.use([
        'util', 'layer'], function () {
        var layer = layui.layer;

        console.info(errorMessage)

        if (errorMessage != null) {
            layer.msg(errorMessage)
        }
    });


</script>
</body>
</html>